<?php
$this->context->bodyClass = 'page-order-goods';
?>
<header>
    <div class="header-left" id="back"><span class="icon icon-arrow-left"></span></div>
    <h1>商品清单</h1>
</header>
<section class="order-goods-list">
    <ul id="orderGoodsList">
        <?php foreach ($cart as $item) : ?>
            <li class="box-sizing box">
                <div class="cart-image">
                    <a href="<?=Yii::$app->urlManager->createUrl(['goodsdetail/index','product_id'=>$item['product_id']]);?>"><img src="<?=$item['pic'];?>"></a>
                </div>
                <div class="cart-detail flex1">
                    <h2><a href="<?=Yii::$app->urlManager->createUrl(['goodsdetail/index','product_id'=>$item['product_id']]);?>"><?=$item['goods_name'];?></a></h2>
                    <div class="cart-spec">
                        <?php foreach ($item['spec_desc'] as $specval): ?>
                            <i><?= $specval['name']; ?>:<?= $specval['value']; ?></i>
                        <?php endforeach; ?>
                    </div>
					<div class="cart-tags"><i><?=$item['type_name'];?></i><?php if($item['free_post'] == 1):?><i>免邮</i><?php endif;?></div>
                    <div
                        class="cart-price">单价:<?php if ($item['price_type'] == 0): ?>￥<i><?= $item['price']; ?></i><?php else: ?><?= $item['price']; ?>试豆<?php endif; ?>
                        x<?= $item['number'] ?></div>
                </div>
            </li>
        <?php endforeach; ?>
    </ul>
</section>
<?php $this->beginBlock('js'); ?>
<script src="<?= Yii::getAlias('@static') ?>/wap/common/js/zepto.min.js"></script>
<script src="<?= Yii::getAlias('@static') ?>/wap/common/js/fastclick.min.js"></script>
<script src="<?= Yii::getAlias('@static') ?>/wap/common/js/king.wap.js"></script>
<script>
    $(function () {
        var backUrl = '<?= Yii::$app->urlManager->createUrl(['order/order-goods', 'cart_ids'=>Yii::$app->request->get('cart_ids', '')]);?>';
		$("#back").on("click", function(){
			$.go(-1);
		});
    })
</script>
<?php $this->endBlock(); ?>
<?php $this->beginBlock('css'); ?>
<link rel="stylesheet" type="text/css" href="<?= Yii::getAlias('@static') ?>/wap/liketry/css/cart.css">
<?php $this->endBlock(); ?>

